import Vue from 'vue'
import Vuex from 'vuex'
import Vant from 'vant'
import 'vant/lib/index.css';

Vue.use(Vant)
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    lis: []
  },
  getters: {


  },
  mutations: {
    setlis(state, payload) {
      state.lis.push(payload)
    },
    dellis(state, item) {
      var result = [];
      for (var i = 0; i < state.lis.length; i++) {
        if (state.lis[i] != item) {
          result.push(state.lis[i]);
        }
      }
      state.lis = result
    }
  },
  actions: {
  },
  modules: {
  }
})
